home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 376-400 / disk_388 / dclock / preinclude.c < prev    next >
C/C++ Source or Header  |  1992-05-06  |  4KB  |  160 lines

  1. /* PreInclude.c *************************************************************
  2.  *
  3.  *    PreInclude.c ----------    Source for precompiled header file.
  4.  *
  5.  *    Author ----------------    Olaf 'Olsen' Barthel, MXM
  6.  *                Brabeckstrasse 35
  7.  *                D-3000 Hannover 71
  8.  *
  9.  *                Federal Republic of Germany
  10.  *
  11.  *    This program truly is in the PUBLIC DOMAIN. Written on a cold
  12.  *    and damp September evening, hoping the next morning would  be
  13.  *    better.
  14.  *
  15.  *    Compiled using Aztec C 5.0a, CygnusEd Professional 2 & ARexx.
  16.  *
  17.  ***************************************************************************/
  18.  
  19. #define __NO_PRAGMAS 1
  20.  
  21. #include <intuition/intuitionbase.h>
  22. #include <libraries/rexxhostbase.h>
  23. #include <libraries/dosextens.h>
  24. #include <workbench/workbench.h>
  25. #include <devices/inputevent.h>
  26. #include <graphics/gfxmacros.h>
  27. #include <workbench/startup.h>
  28. #include <graphics/gfxbase.h>
  29. #include <devices/narrator.h>
  30. #include <exec/interrupts.h>
  31. #include <devices/input.h>
  32. #include <devices/audio.h>
  33. #include <exec/execbase.h>
  34. #include <devices/timer.h>
  35. #include <hardware/cia.h>
  36. #include <exec/memory.h>
  37.  
  38. #include <functions.h>
  39.  
  40. #include <stdlib.h>
  41. #include <string.h>
  42. #include <stdio.h>
  43. #include <ctype.h>
  44.  
  45.     /* Global MessagePort identifier. */
  46.  
  47. #define PORTNAME "DPort"
  48.  
  49.     /* Current DClock revision. */
  50.  
  51. #define REVISION 27
  52.  
  53.     /* Raster size macro. */
  54.  
  55. #define Byte(Width) (((Width + 15) >> 4) << 1)
  56.  
  57.     /* Key combinations (didn't like typing them again and again). */
  58.  
  59. #define RIGHT_AMIGA    (IEQUALIFIER_RELATIVEMOUSE | IEQUALIFIER_RCOMMAND)
  60. #define RIGHT_ALT    (IEQUALIFIER_RELATIVEMOUSE | IEQUALIFIER_RALT)
  61.  
  62.     /* A date information tag. */
  63.  
  64. struct DateTag
  65. {
  66.     SHORT    Year;        /* Year (e.g. 1990). */
  67.     BYTE    Month;        /* Month of year (0-11) */
  68.     BYTE    Day;        /* Day in month (1-31) */
  69.  
  70.     BYTE    Hour;        /* 0-23 */
  71.     BYTE    Minute;        /* 0-59 */
  72.     BYTE    Second;        /* 0-59 */
  73.  
  74.     BYTE    Weekday;    /* Day of week (Sunday = 0) */
  75. };
  76.  
  77.     /* Definitions for AmigaDOS date conversion routine. */
  78.  
  79. #define MINS_PER_HOUR    60
  80. #define TICS_PER_SEC    50
  81. #define DAYS_PER_WEEK    7
  82.  
  83.     /* Days from Jan.1, 0000 to Jan.1, 1978 */
  84.  
  85. #define DDELTA        722449
  86.  
  87.     /* Global MsgPort structure. Note: if you are up to
  88.      * expand this structure, add the new identifiers at the
  89.      * bottom. This will insure upward-compatibility with
  90.      * older DClock and DClock-Handler revisions.
  91.      */
  92.  
  93. struct DSeg
  94. {
  95.     /*******************************************
  96.      * Vital data! Don't change ANYTHING here! *
  97.      *******************************************/
  98.  
  99.     struct MsgPort         Port;        /* Global messageport. */
  100.  
  101.     BPTR             Segment;    /* Pointer to handler segment. */
  102.     LONG             SegSize;    /* Size of DSeg structure. */
  103.  
  104.     struct Task        *Father;    /* Calling process. */
  105.     struct Task        *Child;        /* Waiting process (usually handler). */
  106.  
  107.     ULONG             RingBack;    /* Multi-purpose signal bit. */
  108.  
  109.     ULONG             LastSecs;    /* Timer control. */
  110.     BYTE             Priority;    /* Handler priority. */
  111.     UBYTE             Revision;    /* Could come in handy for future revisions. */
  112.  
  113.     /***********************************************
  114.      * Custom data, open to expansion and changes. *
  115.      ***********************************************/
  116.  
  117.     UBYTE             Beep;        /* Audible beep selected? */
  118.     UBYTE             Click;        /* Keyboard click selected? */
  119.  
  120.     UBYTE             ClickVolume;    /* Volume of keyboard click. */
  121.     UBYTE             Reserved1;
  122.  
  123.     UBYTE             TextColour;    /* Guess what? */
  124.     UBYTE             BackColour;    /* Guess what? */
  125.  
  126.     UBYTE             Alarm;        /* Alarm clock enabled? */
  127.     UBYTE             AlarmHour;    /* Alarm time hour. */
  128.     UBYTE             AlarmMinute;    /* Alarm time minute. */
  129.     UBYTE             AlarmSecond;    /* Alarm time second. */
  130.  
  131.     UBYTE             SetEnv;    /* Set environment variables? */
  132.     UBYTE             Hour;        /* Beep every full hour? */
  133.  
  134.     struct RexxHost        *RexxHost;    /* Rexx host port. */
  135.  
  136.     ULONG             Countdown;    /* Countdown tea timer. */
  137.  
  138.     UBYTE             Seconds;    /* Display seconds? */
  139.  
  140.     UBYTE             Page;        /* Current text display. */
  141.  
  142.     UBYTE             Speech;    /* Speech enabled? */
  143.  
  144.     UBYTE             Online;    /* Are we online? */
  145.  
  146.     struct SignalSemaphore    *SoundSemaphore;/* Hour chime lock. */
  147.     APTR             SoundData;    /* Hour chime data. */
  148.     LONG             SoundLength;    /* Length of hour chime. */
  149.     LONG             SoundRate;    /* Sound replay rate. */
  150.     LONG             SoundVolume;    /* Sound replay volume. */
  151.  
  152.     struct DateTag         CurrentTime;    /* Current time, replaces ExtraTime entry. */
  153.  
  154.     ULONG             Reserved2[10];    /* Expansion data, DO NOT TOUCH! */
  155.  
  156.     /***********************************
  157.      * Append your custom flags below. *
  158.      ***********************************/
  159. };
  160.